package com.studio5704website.core.security;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 高威
 * 处理权限大小的映射类
 */
public class AuthenticationType {
    public final static String USER = "USER";
    public final static String ADMIN = "ADMIN";
    public final static String TOURIST = "TOURIST";
    private static Map<String, Integer> table = new HashMap<String, Integer>(){{
        put("ADMIN", 2);
        put("USER", 1);
        put("TOURIST", 0);
    }};

    public static Integer getType(String authentication) {
        return table.get(authentication);
    }
}
